package com.lngsyz.ywtb.biz.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lngsyz.ywtb.entity.source1.SImg;
import com.lngsyz.ywtb.mapper.source1.SImgMapper;

@Service
public class SImgService {
    
	@Autowired
	SImgMapper sImgMapper;
	
	public void inserts(List<SImg> imgs) {
		if(imgs != null && imgs.size() > 0) {
			sImgMapper.inserts(imgs);
		}
	}
	
	public void insert(SImg img) {
		if(img != null) {
			sImgMapper.insert(img);
		}
	}
	
    public List<SImg> findByPermitId(String permitId){
    	Map<String, Object> param = new HashMap<String, Object>();
    	param.put("sPermitId", permitId);
    	List<SImg> imgs = sImgMapper.findByCondition(param);
		return imgs;
    }
}
